<!--
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/business/inductionfurnace/InductionFurnaceReplenishment.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/business/inductionfurnace/InductionFurnaceReplenishment.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Id',
                footer: "Foots",
                cnName: '补料数据',
                name: 'inductionfurnace/InductionFurnaceReplenishment',
                url: "/InductionFurnaceReplenishment/",
                sortName: "CreateDate",
                foreignKey:null
            });
            const editFormFields = ref({"HeatName":"","OrderFormNo":"","ProductName":"","Heat":"","BatchNumber":"","MaterialWeight":"","CheckListId":"","State":""});
            const editFormOptions = ref([[{"title":"名称","field":"HeatName"},
                               {"title":"订单号","field":"OrderFormNo"},
                               {"title":"产品名称","field":"ProductName"}],
                              [{"title":"批次号","field":"BatchNumber"},
                               {"title":"投入物料量","field":"MaterialWeight","type":"decimal"},
                               {"title":"炉次","required":true,"field":"Heat","type":"number"}],
                              [{"title":"检化验单号","field":"CheckListId"},
                               {"dataKey":"配料单状态","data":[],"title":"状态","field":"State","type":"select"}]]);
            const searchFormFields = ref({"OrderFormNo":"","ProductName":""});
            const searchFormOptions = ref([[{"title":"订单号","field":"OrderFormNo"},{"title":"产品名称","field":"ProductName"}]]);
            const columns = ref([{field:'Id',title:'主键',type:'string',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'HeatId',title:'炉号ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'HeatNo',title:'炉号',type:'string',width:110,align:'left',sort:true},
                       {field:'HeatName',title:'名称',type:'string',width:110,align:'left'},
                       {field:'OrderFormNo',title:'订单号',type:'string',width:110,align:'left'},
                       {field:'ProductName',title:'产品名称',type:'string',width:110,align:'left'},
                       {field:'Heat',title:'炉次',type:'int',width:80,require:true,align:'left'},
                       {field:'BatchNumber',title:'批次号',type:'string',width:110,align:'left'},
                       {field:'MaterialWeight',title:'投入物料量',type:'decimal',width:110,align:'left'},
                       {field:'CheckListId',title:'检化验单号',type:'string',width:110,align:'left'},
                       {field:'State',title:'状态',type:'int',bind:{ key:'配料单状态',data:[]},width:110,align:'left'},
                       {field:'CreateUserName',title:'添加人',type:'string',width:110,align:'left'},
                       {field:'CreateUserId',title:'添加人ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateDate',title:'添加时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ModifyUserName',title:'修改人',type:'string',width:110,align:'left'},
                       {field:'ModifyUserId',title:'修改人ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'DeletionFlag',title:'删除标识',type:'int',width:110,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
